package com.fita.wechat.service;

import java.math.BigDecimal;
import java.util.List;

import com.fita.entity.coupon.Coupon;
import com.fita.entity.order.Order;

/**
 * 
 * @author LZJ
 *
 */
public interface CouponService {
    
    
    
    /**
     * 
     * @param couponId
     * @return
     */
    public Coupon load(Long couponId);
    
    
    /**
     * LZJ
     * @param userId
     * @return
     */
    public List<Coupon> listAllAvailableCoupons(Long userId,BigDecimal cnyPayPrice);
    
    
    /**
     * LZJ
     * @param userId
     * @return
     */
    public List<Coupon> listAllCoupons(Long userId);

    /**
     *
     * @param orderId
     */
    public void unBindCoupon(Long orderId);
    /**
     * LZJ
     * @param orderId
     * @param couponId
     */
    public Coupon bindCoupon(Long orderId,Long couponId);
    
    /**
     * LZJ
     * @param order
     */
    public void useCoupon(Order  order);
    
    
    /**
     * LZJ
     * @param order
     */
    public void resetCoupon(Order order);
    
    /**
     * LZJ
     * @param userId
     * @return
     */
    public int countAvailableCoupons(Long userId);

}
